<?php
$uid = $_SESSION['user_id'];
if($uid){
	$data = M('Accountsinfo')
        ->where("userid = $uid")
->find();
$sum1 = M("lottery_add")->where("uid = $uid")->sum('zong_money');
$sum2 = M("lottery_ssc")->where("uid = $uid")->sum('zong_money');
$sum3 = M("lottery_pk10")->where("uid = $uid")->sum('zong_money');
$sum4 = M("lottery_kl8")->where("uid = $uid")->sum('zong_money');
$sum5 = M("lottery_11x5")->where("uid = $uid")->sum('zong_money');
$sum6 = M("lottery_fc3d")->where("uid = $uid")->sum('zong_money');
$sum7 = M("zhui_kl8")->where("uid = $uid")->sum('zo_money');
$sum8 = M("zhui_pk10")->where("uid = $uid")->sum('zo_money');
$sum9 = M("zhui_ssc")->where("uid = $uid")->sum('zo_money');
$sum10 = M("zhui_x5")->where("uid = $uid")->sum('zo_money');
$tot = $sum1+$sum2+$sum3+$sum4+$sum5+$sum6+$sum7+$sum8+$sum9+$sum10;
}
?>
<script src="/style/js/fx.js"></script>
<div class="header head3">
    <div data-v-5d0c0cde="" id="HeaderTop" class="">
        <div data-v-5d0c0cde="" class="snav">
            <div data-v-5d0c0cde="" class="container">
                <div data-v-5d0c0cde="" class="snavAll"><a data-v-5d0c0cde="" href="./index.html"
                                                           class="">Hi，欢迎来到十分彩网！</a>
                    <ins data-v-5d0c0cde=""> |</ins>
                    <a data-v-5d0c0cde="" class="betNavMore">全部彩票</a></div>
                <ul data-v-5d0c0cde="" class="snavInfo">
                    <?php if($_SESSION['user_id']){ ?>
                    <li data-v-420a60cc="" class="userName MsgShow">
                        <a data-v-420a60cc="" class="_personalInfo">
                            <img data-v-420a60cc="" alt="" src="{$data.avatar}">
                            <i data-v-420a60cc=""><?php echo $data['nickname'];?></i>
                        </a>
                        <span data-v-420a60cc="" id="unreadMsgNum" onclick="window.location=&#39;letter&#39;">0</span>

                        <div data-v-420a60cc="" class="messageShow messageShowContent" style="display: none;">
                            <i data-v-420a60cc=""></i>
                            <dl>
                                <dt><a href="javascript:;" class="" style="float: left;" data-v-420a60cc="">我的未读消息（
                                    <small style="color: #f06701;">0</small>
                                    ）</a><a href="javascript:;" class="" data-v-420a60cc="" style="float: right">更多</a>
                                </dt>
                            </dl>
                        </div>
                    </li>
                    <li data-v-420a60cc="" class="HoverShow">
                        <a href="{:U('Users/securityCenter')}" class="curr" data-v-420a60cc="">我的账户
                            <i data-v-420a60cc="" class="iconfont"></i></a>

                        <div data-v-420a60cc="" class="accountList HoverShowContent" style="display: none;">
                            <i data-v-420a60cc=""></i>
                            <a href="{:U('Users/BetRecord')}" class="" data-v-420a60cc="">投注记录</a>
                            <a href="{:U('Users/BillRecord')}" class="" data-v-420a60cc="">交易记录</a>
                            <a href="{:U('Users/personalInfo')}" class="" data-v-420a60cc="">个人信息</a>
                            <a href="{:U('Users/securityCenter')}" class="curr" data-v-420a60cc="">安全中心</a>
                            <a href="{:U('Users/agentReport')}" class="curr" data-v-420a60cc="">代理中心</a>
                        </div>
                    </li>
                    <li data-v-420a60cc="">余额：
							<span data-v-44d9ce90="" class="GetMoney getMoney ds">
								<em data-v-44d9ce90=""><span id="umon">
                                      <?php if($data['money'] == .000){echo "0.00";}else{echo sprintf("%.2f",$data['money']);} ?>
                                    </span></em>
								<i data-v-44d9ce90="" id="icon" class="iconfont" onclick="dd(this.id)"></i>
								<i data-v-44d9ce90=""><a onclick="yin()">隐藏</a></i>
							</span>
                            <span data-v-420a60cc="" class="ShowMoney showMoney ns" style="display:none;">已隐藏
								<i data-v-420a60cc=""><a onclick="xian()">显示</a></i>
							</span>
                    </li>
                    <li data-v-420a60cc="">
                        <a href="{:U('Index/ebankPay')}" class="" data-v-420a60cc="">充值</a></li>
                    <li data-v-420a60cc="">
                        <a href="{:U('Index/withdraw')}" class="tixan" data-v-420a60cc="">提现</a></li>
                    <li data-v-420a60cc="" class="LoginOut"><a href="{:U('Index/logout')}">退出</a></li>
                    <?php }else{ ?>
                    <li data-v-5d0c0cde="">
                        <a data-v-5d0c0cde="" href="{:U('Index/login')}" class="curr">亲，请登录</a>
                        <!-- <i data-v-5d0c0cde="" class="vertical"></i> --></li>
                    <li data-v-5d0c0cde="">
                        <a data-v-5d0c0cde="" href="{:U('Index/register')}" class="">用户注册</a>
                    </li>
                    <?php }?>
                    <a data-v-5d0c0cde="" href="https://kefu.qycn.com/vclient/chat/?websiteid=126849" class="serviceLink ServiceBtn"><i data-v-5d0c0cde="" class="iconfont"></i><span
                            data-v-5d0c0cde=""></span></a>
                </ul>
            </div>
            <div data-v-3191fb32="" class="cardBox fx_cardBox1" data-v-420a60cc="" style="top: 35px; display: none;">
                <div data-v-3191fb32="" class="card fix">
                    <div data-v-3191fb32="" class="cardLeft">
                        <img data-v-3191fb32="" src="{$data.avatar}" alt="" width="80" height="80">
                        <if condition="$data.nickname eq '' "><h6 data-v-3191fb32=""> 昵称未设置</h6>
                            <else/>
                            <h6 data-v-3191fb32=""> {$data.nickname}</h6>
                        </if>
                    </div>
                    <div data-v-3191fb32="" class="cardInfo">
                        <ul data-v-3191fb32="">
                            <li data-v-3191fb32="">性别：
                                <if condition="$data.sex eq 1 "> 男
                                    <elseif condition="$data.sex eq 2"/>
                                    女
                                    <else/>
                                    保密
                                </if>
                            </li>
                            <li data-v-3191fb32="">账号：{$data.accounts}</li>
                            <li data-v-3191fb32="">等级：
                                <?php if($data['score'] < '10'){echo 'VIP1';}
                                  elseif('10' <= $data['score'] && $data['score'] < '200'){echo 'VIP2';}
                                  elseif('200' <= $data['score'] && $data['score'] < '1000'){echo 'VIP3';}
                                  elseif('1000' <= $data['score'] && $data['score'] < '10000'){echo 'VIP4';}
                                  elseif('10000' <= $data['score'] && $data['score'] < '50000'){echo 'VIP5';}
                                  elseif('50000' <= $data['score'] && $data['score'] < '250000'){echo 'VIP6';}
                                  elseif('250000' <= $data['score'] && $data['score'] < '1000000'){echo 'VIP7';}
                                  elseif('1000000' <= $data['score'] && $data['score'] < '5000000'){echo 'VIP8';}
                                  elseif('5000000' <= $data['score']){echo 'VIP9';}; 
							?>
                            </li>
                            <li data-v-3191fb32="">头衔：
                                <?php if($data['score'] < '10'){echo '农民';}
                                  elseif('10' <= $data['score'] && $data['score'] < '200'){echo '地主';}
                                  elseif('200' <= $data['score'] && $data['score'] < '1000'){echo '知县';}
                                  elseif('1000' <= $data['score'] && $data['score'] < '10000'){echo '通判';}
                                  elseif('10000' <= $data['score'] && $data['score'] < '50000'){echo '知府';}
                                  elseif('50000' <= $data['score'] && $data['score'] < '250000'){echo '总督';}
                                  elseif('250000' <= $data['score'] && $data['score'] < '1000000'){echo '巡抚';}
                                  elseif('1000000' <= $data['score'] && $data['score'] < '5000000'){echo '丞相';}
                                  elseif('5000000' <= $data['score']){echo '帝王';}; 
							?>
                            </li>
                            <li data-v-3191fb32="">累计中奖：{$tot}</li>
                        </ul>
                    </div>
                    <ul data-v-3191fb32="" class="cardIcon fix">
                        <li data-v-3191fb32="" id="1">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont L_K3"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_SSC"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_SYX5"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_PK10"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_KL8"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="1">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont L_FC3D"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_PL35"></i></a>
                            <!--灰色时加类名 noActive-->
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!---->
    <div class="nav">
        <div class="container fix"><h3><a href="{:U('Index/index')}"><img src="/style/images/logo1.png"></a></h3>
            <!---->
            <ul class="navItem fix flr" id="hidNav">
                <li class="" data-hid="1" id="navIndex"><a href="{:U('Index/index',array('hid'=>'1'))}">首页</a></li>
                <li class="" data-hid="2" id="navLottery"><a href="{:U('Index/lotteryHall',array('hid'=>'2'))}">购彩大厅</a>
                </li>
                <li class="" data-hid="7" id=""><a href="{:U('Expe/yuqi',array('hid'=>'7'))}">追号计划</a></li>
                <li class="" data-hid="3" id="navActivity"><a href="{:U('Index/activity',array('hid'=>'3'))}">活动中心</a>
                </li>
                <li class="" data-hid="4" id="navMobile"><a href="{:U('Index/mobile',array('hid'=>'4'))}" class="curr">手机购彩</a>
                </li>
                <li class="" data-hid="5" id="navSecurityCenter"><a
                        href="{:U('Users/securityCenter',array('hid'=>'5'))}">我的账户</a></li>
                <li class="" data-hid="6" id="navHelp"><a href="{:U('Index/helpCenter',array('hid'=>'6'))}">帮助指南</a>
                </li>
                <span></span>
            </ul>
        </div>
    </div>
</div>
<div id="layermbox211" class="layermbox layermbox0 layermshow" index="2" style="display: none;">
    <div class="laymshade"></div>
    <div class="layermmain">
        <div class="section">
            <div class="layermchild layerConfirm width380 layermanim"><h3 style="">温馨提示</h3>
                <button class="layermend"></button>
                <div class="layermcont">您还未设置安全密码和绑定银行卡，无法提现，是否先去设置安全密码?</div>
                <div class="layermbtn"><span type="0">否</span><span type="1" class="shi">是</span></div>
            </div>
        </div>
    </div>
</div>

<div id="layermbox212" class="layermbox layermbox0 layermshow" index="2" style="display: none;">
    <div class="laymshade"></div>
    <div class="layermmain">
        <div class="section">
            <div class="layermchild layerConfirm width380 layermanim"><h3 style="">温馨提示</h3>
                <button class="layermend"></button>
                <div class="layermcont">您还没绑定银行卡，无法提现，是否先去绑定银行卡?</div>
                <div class="layermbtn"><span type="0">否</span><span type="1" class="shi">是</span></div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    var hid1 = '<?php echo $hid;?>';
    var uuid = '<?php echo $uid;?>';
    //		if(hid1==''){
    //			hid1 =1;
    //		}
    $("#hidNav li").each(function () {
        var hid2 = $(this).data("hid");
        if (hid2 == hid1) {
            $(this).addClass("curr");
        }
    })

    function yin() {
        $(".ds").hide();
        $(".ns").show();
    }
    function xian() {
        $(".ds").show();
        $(".ns").hide();
    }
    function dd(ong) {
        $("#" + ong).addClass("refreshMove");
        setTimeout(function () {
            $("#" + ong).removeClass("refreshMove");
        }, 1000);


        $.ajax({
            type: "POST",
            url: "{:U('Users/get_money')}",
            data: {uuid: uuid},
            success: function (dat) {
                var dataObj = eval("(" + dat + ")");
                $('#umon').empty();   //清空resText里面的所有内容
                $('#umon').html(dataObj.money);
            }
        });
    }

    $(function () {
        personalInfo();


        hover1();
        function hover1() {
            var k = 2;
            var BOX = $(".messageShowContent");
            $("#unreadMsgNum").hover(function () {
                BOX.show();
            }, function () {

                setTimeout(function () {
                    if (k == 1) {
                        BOX.show();
                    } else {
                        BOX.hide();
                    }
                }, 200)
            });
            BOX.hover(function () {
                k = 1;
            }, function () {
                BOX.hide();
                k = 2;
            })
        }


        hover2();
        function hover2() {
            var k = 2;
            var L = ($(window).width() - 1000) / 2 + 260;
            var BOX = $(".fx_cardBox1");
            BOX.css("left", L);
            $("._personalInfo").hover(function () {
                BOX.show();
            }, function () {

                setTimeout(function () {
                    if (k == 1) {
                        BOX.show();
                    } else {
                        BOX.hide();
                    }
                }, 100)
            });
            BOX.hover(function () {
                k = 1;
            }, function () {
                BOX.hide();
                k = 2;
            })
        }
    })

    $(".tixan").click(function () {
        $.ajax({
            type: "POST",
            url: "{:U('Users/is_bang')}",
            data: {uuid: uuid},
            success: function (dat) {
                if (dat == '1') {
                    $("#layermbox211").show();
                } else if (dat == '2') {
                    $("#layermbox212").show();
                } else if (dat == '3') {

                } else {
                    location.href = "{:U('Index/withdraw')}";
                }
            }
        });
    })
    $("#layermbox211 .shi").click(function () {
        location.href = "{:U('Users/setSafePwd',array('is_bang'=>1))}";
    })
    $("#layermbox212 .shi").click(function () {
        location.href = "{:U('Users/manageBankcard2')}";
    })
</script>